package com.autocloud.mirspringboot.core.dao;

import com.autocloud.mirspringboot.core.entity.SysMenuEntity;
import com.autocloud.mirspringboot.core.entity.SysRoleEntity;
import com.autocloud.mirspringboot.core.entity.SysUserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zhongwb
 * @version 1.0
 * @description 系统用户DAO
 * @date 2020/1/12 10:56 上午
 */
@Mapper
public interface SysUserDao extends BaseMapper<SysUserEntity> {
    /**
     * 通过用户ID查询角色集合
     *
     * @Param userId 用户ID
     * @Return List<SysRoleEntity> 角色名集合
     */
    List<SysRoleEntity> selectSysRoleByUserId(Long userId);

    /**
     * 通过用户ID查询权限集合
     *
     * @Param userId 用户ID
     * @Return List<SysMenuEntity> 角色名集合
     */
    List<SysMenuEntity> selectSysMenuByUserId(Long userId);
}
